<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" type="text/css" href="http://localhost/AppStores/public/template/admin/style/style.css"/>
        <title></title>
    </head>
    <body>
        <?php
        if (!isset($_SESSION['user_admin'])) {
            if (CONTROLLER == 'Index' && ACTION == 'index') {
                require_once TEMPLATE;
//include_once TEMPLATE;
            } else {
                header('Location: ' . URL_BASE . '/admin');
            }
        } else {
            ?>
            <div id="header">
                <li class=""><a href="#">Bạn đang sử dụng tài khoản: <?php if (isset($_SESSION['user_admin'])) echo $_SESSION['user_admin']; ?></a></li>
                <li class="logout"><a href="<?php echo URL_BASE ?>/admin/logout">Thoát</a></li>
            </div>

            <div id="container">
                <div id="sidebar">
                    <ul class="sideNav">
                        <li><a href="<?php echo URL_BASE . '/admin/about' ?>">Thông tin</a></li>
                        <li><a href="<?php echo URL_BASE . '/admin/apps' ?>">Quản lý ứng dụng</a></li>
                        <li><a href="<?php echo URL_BASE . '/admin/category' ?>">Quản lý chuyên mục</a></li>
                        <li><a href="<?php echo URL_BASE . '/admin/customers' ?>">Quản lý thành viên</a></li>
                        <li><a href="<?php echo URL_BASE ?>/admin/customer">Quản lý quảng cáo</a></li>
                    </ul>
                </div>
                <div id="main-container">
                    <?php
                    if (TEMPLATE != "../application/admin/views/index/index.php")
                        include_once TEMPLATE;
                    ?>
                </div>

            </div>
            <div class="clear"></div>
            <div id="footer">
                <center>Editer by Việt Hùng  </center>
            </div>
<?php } ?>
    </body>
</html>
